// 该文件用于配置动态路由

import BasicLayout from "@/layout/basic-layout.vue";

// import DashboardConsole from "@/views/dashboard/console/index.vue";
// import DashboardMonitor from "@/views/dashboard/monitor/index.vue";
// import DashboardWorkplace from "@/views/dashboard/workplace/index.vue";

// 路由懒加载
const SystemUser = () => import("@/views/system/user/index.vue");
const SystemMenu = () => import("@/views/system/menu/index.vue");
const SystemRole = () => import("@/views/system/role/index.vue");

const BannerAdd = () => import("@/views/banner/add/index.vue");
const BannerAddNew = () => import("@/views/banner/add-new/index.vue");
const BannerList = () => import("@/views/banner/list/index.vue");
const BannerListNew = () => import("@/views/banner/list-new/index.vue");

const ProductList = () => import("@/views/product/list/index.vue");
const ProductListNew = () => import("@/views/product/list-new/index.vue");
const ProductSearchList = () => import("@/views/product/search-list/index.vue");

const DashboardConsole = () => import("@/views/dashboard/console/index.vue");
const DashboardMonitor = () => import("@/views/dashboard/monitor/index.vue");
const DashboardWorkplace = () =>
  import("@/views/dashboard/workplace/index.vue");

export default [
  {
    path: "/dashboard",
    name: "dashboard",
    label: "Dashboard",
    component: BasicLayout,
    children: [
      {
        path: "console",
        name: "dashboard_console",
        label: "主控台",
        component: DashboardConsole,
      },
      {
        path: "monitor",
        name: "dashboard_monitor",
        label: "监控页",
        component: DashboardMonitor,
      },
      {
        path: "workplace",
        name: "dashboard_workplace",
        label: "工作台",
        component: DashboardWorkplace,
      },
    ],
  },

  {
    path: "/system",
    name: "system",
    label: "系统管理",
    component: BasicLayout,
    children: [
      {
        path: "user",
        name: "system_user",
        label: "用户管理",
        component: SystemUser,
      },
      {
        path: "menu",
        name: "system_menu",
        label: "菜单管理",
        component: SystemMenu,
      },
      {
        path: "role",
        name: "system_role",
        label: "角色管理",
        component: SystemRole,
      },
    ],
  },

  {
    path: "/banner",
    name: "banner",
    label: "轮播图管理",
    component: BasicLayout,
    children: [
      {
        path: "add",
        name: "banner_add",
        label: "轮播图新增",
        component: BannerAdd,
      },
      {
        path: "add-new",
        name: "banner_add-new",
        label: "轮播图新增-new",
        component: BannerAddNew,
      },
      {
        path: "list",
        name: "banner_list",
        label: "轮播图列表",
        component: BannerList,
      },
      {
        path: "list-new",
        name: "banner_list-new",
        label: "轮播图列表-new",
        component: BannerListNew,
      },
    ],
  },

  {
    path: "/product",
    name: "product",
    label: "产品管理",
    component: BasicLayout,
    children: [
      {
        path: "list",
        name: "product_list",
        label: "产品列表",
        component: ProductList,
      },
      {
        path: "list-new",
        name: "product_list-new",
        label: "产品列表-new",
        component: ProductListNew,
      },
      {
        path: "search-list",
        name: "product_search-list",
        label: "搜索列表",
        component: ProductSearchList,
      },
    ],
  },
];
